package com.fjd.controller;

import com.fjd.result.Result;
import com.fjd.service.CheckoutService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;

@RestController
@Api(tags = "结算相关接口")
@Slf4j
@RequestMapping("/shopping/check")
public class CheckoutController {
    @Autowired
    private CheckoutService checkoutService;

    @GetMapping("/anchor")
    @ApiOperation("博主查看自己收益情况")
    public Result<BigDecimal> anchorCheck(){
        BigDecimal income = checkoutService.anchorcheck();
        return Result.success(income);
    }

}
